<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<#include "/common/content/content.htm"/>
<title>华迪应用开发平台</title>
<link href="${cssPath}/login.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">var ctxPath="${ctxPath}";</script>
<script type="text/javascript" src="${ctxPath}/static/js/jquery.js"></script>	
<script type="text/javascript" src="${ctxPath}/common/lib/common.js"></script>
<script type="text/javascript">
window.onload = function(){
	var oUser = initTxtField('user');
	var oPass = initTxtField('pass');
}

function initTxtField(txtId){
	oInput = document.getElementById(txtId);
	oInput.onfocus = function(){
		this.style.backgroundPosition = '0 -40px';
	};
	oInput.onblur = function(){
		this.style.backgroundPosition = '0 0';
	};
	return oInput;
}
</script>
</head>
<body>
  <div class="login">
    <h1><img src="${imagePath}/login/logtit.gif" /></h1>
    <!--content start-->
    <div class="loginForm">
    <form id="loginForm" name="loginForm" action="${ctxPath}/s_j_check" method="post">
      <ul>
        <li class="textbox">
            <strong>用户名：</strong>
            <label for="user">
                <input _placeholder="请输入用户名！" id="user" class="text" name="j_username" type="text" />
            </label>
        </li>
        <li class="textbox">
            <strong>密&nbsp;&nbsp;&nbsp;&nbsp;码：</strong>
            <label for="pass">
                <input  name="j_password" id="pass" class="text" type="password" />
            </label>
        </li>
        <li class="submit fix">
            <a href="javascript:void(0)" onclick=login()></a>
        </li>
      </ul>
     </form>
</div>
    <!--content start-->
    <div class="logbot"></div>
  </div>
  <!--footer-->
  <#include "/common/content/foot.htm">
<script type="text/javascript">
		//这里只用来做测试，不用来实际开发
		
		function login()
		{
		
				var userName = $("#user").val();
				var pass = $("#pass").val();
				var FData={loginName:userName,password:pass};
				function callBackFunc (res){
							if(res.success)
							{
								window.location.href="${ctxPath}/sys/login!toSucc.action";
							}
							else
							{
								window.location.href="${ctxPath}/sys/login!toFail.action";
							}
				
				}
				var config={url:'${ctxPath}/sys/login!check.action',data:FData,callBackFunc:callBackFunc,type:'JSON'};
			
				HD.doPost(config);
		}
</script>
</body>
</html>